/**
 * @file hal_board_cfg2.h
 * @brief 
 * @author Tome (baojian.liu-a1105@aqara.com)
 * @date 2021-02-25
 */
 
// include 

 

#ifndef HAL_BOARD_CFG_H
#define HAL_BOARD_CFG_H
 
 
 
/****************************************************************************************************************************** 
                                                            const
*******************************************************************************************************************************/




// <<< Use Configuration Wizard in Context Menu >>>\n




// <h> MCU  

// <o> MCU_MAIN_FREQ(HZ)
// <0=> 32K768 <1=> 38k4 <2=> 4M <3=> 8M <4=> 16M <5=> 22M12 <6=> 24M
// <i> mcu main clock frequency
#define MCU_MAIN_FREQ		5

// </h>


// <e> BOARD_STA_LED_ENALBE
// <i> 1 toggle a gpio every circle , 0 do nothing
#define BOARD_STA_LED_ENALBE         1


// <o> BOARD_STA_LED_FUNCTION
// <0=> DISABLE <1=> SLEEP_LED <2=> CIRCLE_LED <3=> RVD2 <4=> RVD3 <5=> DEBUG_LED
#define BOARD_STA_LED_FUNCTION          5


#define BOARD_STA_LED_FUN_DISABLE       0
#define BOARD_STA_LED_FUN_SLEEP         1
#define BOARD_STA_LED_FUN_CIRCLE        2
#define BOARD_STA_LED_FUN_DEBUG         5


// </e>


// <q> BOARD_PROTECT_ENABLE
// <i> 1 protect use hardware time , 0 do nothing

#define BOARD_PROTECT_ENABLE    0



// <e> BOARD_LED_ENABLE
// <i> 1 USE LED, else NOT

#define BOARD_LED_ENABLE    1

// <o> BOARD_LED_NUMBER
// <0-5>
// <i> config how many LEDs on board?
#define BOARD_LED_NUMBER  4

// <q> BOARD_LED_BREATH
// <i> LED support breath(1) or not(0)
#define BOARD_LED_BREATH           	1

// <q> BOARD_LED_BLINK
// <i> LED support blink(1) or not(0)
#define BOARD_LED_BLINK           	1

// </e>

// <e> BOARD_BUTTON_ENABLE
// <i> 1 USE LED, else NOT

#define BOARD_BUTTON_ENABLE    0


// <o> BOARD_BTN_NUMBER
// <0-5>
// <i> config how many Buttons on board?
#define BOARD_BTN_NUMBER  1

// <o> BOARD_BTN_DEBOUNCE_VALUE(ms)      
// <10-30>
// <i> button debounce time(ms)
#define BOARD_BTN_DEBOUNCE_VALUE  25


// </e>

// <e> BOARD_HOST_ENABLE
// <i> gpio connect to 52840
#define BOARD_HOST_ENABLE   0

// <o> BOARD_HOST_READY_KEEP_TIME(ms)
// < 1 - 10 >
// <i> ready active keep time after wakeup deposive pluse
#define BOARD_HOST_READY_KEEP_TIME  2


// <o> BOARD_HOST_DATA_KEEP_TIME(second)
// < 1 - 10 >
// <i> data keep in fifo, clear if wait more than this time.
#define BOARD_HOST_DATA_KEEP_TIME  3

// <o> BOARD_HOST_DEBOUNCE_VALUE(ms)      
// <3-20>
// <i> wakeup debounce time(ms)
#define BOARD_HOST_DEBOUNCE_VALUE  3

// </e>

// <e> BOARD_WDT_ENABLE
// <i> 1 USE WDT, else NOT

#define BOARD_WDT_ENABLE    1


// <o> BOARD_WDT_TIME
// <0=> 1.6ms
// <1=> 3.2ms
// <2=> 6.4ms
// <3=> 13ms
// <4=> 26ms
// <5=> 51ms
// <6=> 102ms
// <7=> 205ms
// <8=> 500ms
// <9=> 820ms
// <10=> 1.64s
// <11=> 3.28s
// <12=> 6.55s
// <13=> 13.1s
// <14=> 26.2s
// <15=> 52.4s
// <i> config wdt overflow interval
#define BOARD_WDT_TIME  11

// <o> BOARD_WDT_ACTION
// <0=> reset
// <1=> interrupt
// <i> acttion when wdt overflow
#define BOARD_WDT_ACTION  0



// </e>

// <q> BOARD_CW2017_ENABLE
// <i> 1 ENABLE, 0 DISABLE
#define BOARD_CW2017_ENABLE    0

// <q> BOARD_SY6982_ENABLE
// <i> 1 ENABLE, 0 DISABLE
#define BOARD_SY6982_ENABLE    0

// <e> BOARD_I2C_SLAVE_ENABLE
// <i> 1 USE I2C_SLAVE, else NOT
#define BOARD_I2C_SLAVE_ENABLE	0

// <o> BOARD_I2C_SLAVE_SEND_BUF_LEN
// <i> config i2c send buf length
#define BOARD_I2C_SLAVE_SEND_BUF_LEN	128
// <o> BOARD_I2C_SLAVE_RECV_BUF_LEN
// <i> config i2c recv buf length
#define BOARD_I2C_SLAVE_RECV_BUF_LEN	128

// <o> BOARD_I2C_SLAVE_COM_TIME_OUT
// <i> config i2c communication time out (unit ms)
#define BOARD_I2C_SLAVE_COM_TIME_OUT	1000  


// </e>


// <e> BOARD_UART_ENABLE
// <i> 1 USE UART, else NOT
#define BOARD_UART_ENABLE	0

// <q> BOARD_RECEIVE_ENABLE
// <i> 1 ENABLE, 0 DISABLE
#define BOARD_RECEIVE_ENABLE    0

// <o> BOARD_UART_SEND_BUF_LEN
// <i> config uart send buf length
#define BOARD_UART_SEND_BUF_LEN		512
// <o> BOARD_UART_RECV_BUF_LEN
// <i> config uart recv buf length
#define BOARD_UART_RECV_BUF_LEN		64

// <o> BOARD_UART_RECV_TIMEOUT
// <i> config uart recv time out (unit ms)
#define BOARD_UART_RECV_TIME_OUT	50  

// <o> BOARD_UART_WRITE_DELAY
// <i> config uart write delay (unit us)
#define BOARD_UART_WRITE_DELAY		20  


// </e>


// <q> BOARD_ERRCHK_ENABLE
// <i> 1 ENABLE, 0 DISABLE
#define BOARD_ERRCHK_ENABLE    0

// <<< end of configuration section >>> \n


/****************************************************************************************************************************** 
                                                            typedef
*******************************************************************************************************************************/













/****************************************************************************************************************************** 
                                                            MICRO
*******************************************************************************************************************************/







/****************************************************************************************************************************** 
                                                            declearation
*******************************************************************************************************************************/










#endif //HAL_BOARD_CFG_H
